<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org"
	xmlns:shiro="http://www.pollix.at/thymeleaf/shiro">
<meta charset="utf-8">
<head th:include="include :: header"></head>
<div th:include="include :: footer"></div>
<body class="gray-bg top-navigation">
	<div th:include="include :: w_header"></div>

	{{url}}
	<div style="margin-top: 4rem;">
		<div class="wrapper wrapper-content" >
			<div class="container">
				<div class="row">
					<div class="col-lg-12">
						<div class="ibox float-e-margins">

							<div class="ibox-content">
								<div class="row">
									<div class="col-sm-3">
										<div class="input-group">
											<input type="text" placeholder="搜索" class="input-sm form-control w_user_name"> <span class="input-group-btn">
													<button type="button" onclick="" class="btn btn-sm btn-primary">搜索</button> </span>
										</div>
									</div>
								</div>

								<table id="bootstrap-table" data-mobile-responsive="true"></table>

							</div>
						</div>
					</div>

				</div>
			</div>
		</div>
	</div>




	<div th:include="include :: w_footer"></div>
	<script th:inline="javascript">
        var prefix = ctx + "system/wxUser";

        $(function() {
            var options = {
                url: prefix + "/list",
                createUrl: prefix + "/add",
                updateUrl: prefix + "/edit/{id}",
                //removeUrl: prefix + "/remove",
                sortName: "subscribeTime", // 排序字段
                modalName: "微信用户",
                search: false,
                showExport: false,
                columns: [{
                    checkbox: true
                },
                    {
                        field: 'headImgUrl',
                        title: '头像',
                        align: 'center',
                        formatter: function(value) {
                            return '<img src="'+value+'" class="img-circle" height="60" width="60"/>';
                        }
                    },
                    {
                        field: 'nickName',
                        title: '用户名称',
                        align: 'center',
                    },
                    /* {
                         field: 'openid',
                         title: 'openId'
                     },*/
                    {
                        field: 'sex',
                        title: '性别',
                        align: 'center',
                        formatter: function(value) { //  格式化
                            if (value == 1) {
                                return '<span class="badge badge-primary">男</span>';
                            } else if (value == 2) {
                                return '<span class="badge badge-danger">女</span>';
                            }
                        }
                    },
                    {
                        field: 'province',
                        title: '省份',
                    },
                    {
                        field: 'city',
                        title: '城市',
                    },
                    {
                        field: 'wxName',
                        title: '公众号',
                    },

                    {
                        field: 'subscribeTime',
                        title: '注册时间',
                        sortable: true
                    }]
            };
            $.table.init(options);
        });
	</script>
</body>
</html>